{% extends 'base.html' %}


{% block title %}{{ name }}{% endblock %}

{% block breadcrumb %}
<nav aria-label="breadcrumb">
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="/">Datasets</a></li>
        <li class="breadcrumb-item active" aria-current="page">{{ name }}</li>
    </ol>
</nav>
{% endblock %}

{% block head %}{{ name }}{% endblock %}

{% block content %}
{% if samples %}
<p>以下为现有数据记录，最多显示50条。</p>
<div class="row mt-5 mb-5">
    <div class="input-group mr-3 col">
        <span class="input-group-text" id="basic-addon1">文件名</span>
        <input type="text" class="form-control" placeholder="文件名" aria-label="filename" aria-describedby="basic-addon1">
    </div>
    <div class="input-group mr-3 col">
        <span class="input-group-text" id="basic-addon1">标签</span>
        <input type="text" class="form-control" placeholder="标签" aria-label="label" aria-describedby="basic-addon2">
    </div>
    <div class="input-group mr-3 col">
        <span class="input-group-text" id="basic-addon1">作者</span>
        <input type="text" class="form-control" placeholder="名字" aria-label="label" aria-describedby="basic-addon2">
    </div>
    <div class="col">
        <button type="button" class="btn btn-primary">筛选</button>
    </div>
</div>
<table class="table table-striped table-hover">
    <thead>
        <tr>
            <th scope="col">#</th>
            <th scope="col">文件名</th>
            <th scope="col">标签</th>
            <th scope="col">作者</th>
            <th scope="col">上传日期</th>
        </tr>
    </thead>
    <tbody>
        {% for sample in samples %}
        <tr>
            <th scope="row">{{loop.index}}</th>
            <td><a href="{{ sample['href'] }}">{{ sample['base_name'] }}</a></td>
            <td>{{ sample['manual_tags'] }}</td>
            <td>{{ sample['authors'] }}</td>
            <td>{{ sample['index_time'] }}</td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% else %}
<div class="alert alert-primary" role="alert">
    没有找到记录。
</div>
{% endif %}
{% endblock %}